﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ServiceModel;
using System.ServiceModel.Channels;
using TwitterBEIS_SL3_SLApp.TwitterProxyReference;

namespace TwitterBEIS_SL3_SLApp
{
    public class TwitterProxy
    {
        public static TwitterProxyReference.TwitterProxyClient GetProxy()
        {
            Binding customBinding = new CustomBinding(new BinaryMessageEncodingBindingElement(), new HttpTransportBindingElement());
            EndpointAddress address = new EndpointAddress(new Uri(App.Current.Host.Source + "/../../TwitterProxy.svc/binary"));

            return new TwitterProxyReference.TwitterProxyClient(customBinding, address);
        }
    }
}
